#include "testergui.h"


TesterGUI::TesterGUI(QWidget *parent)
    : QDialog(parent)
{
	ui.setupUi(this);
	model = new QDirModel();

	ui.TrainfileView->setModel(model);
	ui.TrainfileView->setRootIndex(model->index(QDir::currentPath()));

	ui.TestfileView->setModel(model);
	ui.TestfileView->setRootIndex(model->index(QDir::currentPath()));

	connect(ui.trainChangeDir, SIGNAL(clicked()), this, SLOT(trainChangeDirClicked()));
	connect(ui.testChangeDir, SIGNAL(clicked()), this, SLOT(testChangeDirClicked()));
	connect(ui.testButton, SIGNAL(clicked()), this, SLOT(testClicked()));
	connect(ui.trainButton, SIGNAL(clicked()), this, SLOT((testClicked)));
	ui.objects->addItem("cup");

}
void TesterGUI::trainChangeDirClicked(){
	QString dir = QFileDialog::getExistingDirectory(this,
	     tr("Open Directory"), "/home/alper", QFileDialog::ShowDirsOnly
         | QFileDialog::DontResolveSymlinks);
	ui.TrainfileView->setRootIndex(model->index(dir));
}
void TesterGUI::testChangeDirClicked(){
	QString dir = QFileDialog::getExistingDirectory(this,
	     tr("Open Directory"), "/home/alper", QFileDialog::ShowDirsOnly
         | QFileDialog::DontResolveSymlinks);
	ui.TestfileView->setRootIndex(model->index(dir));
}

void TesterGUI::trainClicked()
{

}
void TesterGUI::testClicked(){

}
TesterGUI::~TesterGUI()
{

}
